const baseUrl = 'http://localhost:3005';

export const getBaseUrl = ()=>{
   return baseUrl;
}

export const requestUtil= (params)=>{
  return new Promise((resolve, reject)=>{
    wx.request({
      ...params,
      url: baseUrl + params.url,
      success: resp =>{
        resolve(resp);
      },
      fail: resp=>{
        reject(resp);
      }
    })
  })
}